home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
system
/
porttool.zip
/
CHMOD.MAN
< prev
next >
Wrap
Text File
|
1992-12-03
|
4KB
|
97 lines
NNAAMMEE
chmod - change the permissions mode of a file
SSYYNNOOPPSSIISS
cchhmmoodd [ --RRffhh ] _m_o_d_e _f_i_l_e_n_a_m_e ...
DDEESSCCRRIIPPTTIIOONN
Change the attributes (mode) of a file or files.
The mode of each named file is changed according to _m_o_d_e, which may
be absolute or symbolic, as follows.
Absolute Modes
An absolute _m_o_d_e is an octal number constructed by ORing the
following values together:
400 Read by owner.
200 Write by owner.
100 Execute (search in directory) by owner.
040 Read by group.
020 Write by group.
010 Execute (search) by group.
004 Read by others.
002 Write by others.
001 Execute (search) by others.
4000 Set user ID on execution.
2000 Set group ID on execution (this bit is ignored if the
file is a directory; it may be set or cleared only
using symbolic mode).
1000 Sticky bit, (see chmod(2) for more information).
These values are supported only for Unix compatibility, under
MS-DOS and OS/2 only the Write attribute is examined and is used
to set the Read-Only atrribute.
Symbolic Modes
A symbolic _m_o_d_e has the form:
[ _w_h_o ] _o_p _p_e_r_m_i_s_s_i_o_n [ _o_p _p_e_r_m_i_s_s_i_o_n ] ...
_w_h_o is a combination of:
u User's permissions.
g Group permissions.
o Others.
a All, or ugo.
If _w_h_o is omitted, the default is aa.
_o_p is one of:
+ To add the _p_e_r_m_i_s_s_i_o_n.
- To remove the _p_e_r_m_i_s_s_i_o_n.
= To assign the permission explicitly (all other bits for
that category, owner, group, or others, will be reset).
_p_e_r_m_i_s_s_i_o_n is any combination of:
r Read.
w Write.
x Execute.
X Give execute permission if the file is a directory or if
there is execute permission for one of the other user
classes.
s Set owner or group ID. This is only useful with u or g.
Also, the set group ID bit of a directory may only be
modified with '+' or '-'.
t Set the sticky bit to save program text between processes.
A Set the MS-DOS and OS/2 Archive attribute.
H Set the MS-DOS and OS/2 Hidden attribute.
S Set the MS-DOS and OS/2 System attribute.
The letters u, g, or o indicate that _p_e_r_m_i_s_s_i_o_n is to be taken
from the current mode for the user-class.
Omitting _p_e_r_m_i_s_s_i_o_n is only useful with '=', to take away all
permissions.
Multiple symbolic modes, separated by commas, may be given.
Operations are performed in the order specified.
Again, symbolic values are supported only for Unix compatibility.
For MS-DOS and OS/2 the only applicable symbolic values are w, A, H
and S.
OOPPTTIIOONNSS
--RR Recursively descend through directory arguments, setting the
mode for each file as described above.
--ff Force. cchhmmoodd will not complain if it fails to change the mode
of a file.
--hh Display a short help message.
CCooppyyrriigghhtt ((cc)) 11999922 FFrraannkk EE.. WWhhaalleeyy AAllll rriigghhttss rreesseerrvveedd